POP3Rules is extension of POP3Toss.cfg. It allows to sort
inbound e-mail by content its header fields and its body
and it allows to generate auto-answers.

Example:
-------------- Begin of pop3toss.rules -------------------
:- from~ "Boss Sender1" from~ "Boss Sender2" OR
:- to~ "Boss Name"
==> boss@local

:- from~ my_friend@email.com
    :action replay: " Hello, Friend! %NEW-LINE%%DATE%%NEW-LINE%I can't replay now. I am not here."
:- from~ humor@email.ru
    :action to: my_friend@email.com
            message: " What do you think about it? %NEW-LINE%%RAW-BODY%"
:- to~ "My Name"
==> my_local_name@local
    :action replay-with-pattern: "agents\wait_my_return.pat" ;

:- not-tossed? ==> orphan@local

:- to~ @ ==> pop3archive@local
-------------- End of pop3toss.rules ---------------------

Explanation:

:-          begins rule definition.
;           ends rule definitions (not required).
==> e-mail  ends rules definitions for one addressee and defines this
            addressee

from~ pattern \
to~   pattern  \ compares pattern with corresponding field of e-mail or
subj~ pattern  / its body and generate logical value (TRUE/FALSE)
body~ pattern /

field" FieldName:" returns value of corresponding field.
    You can use this construction in that way:
        field" X-Mailer:" S" Microsoft" ~match

'pattern' is "string with blank" or string_without_blank. You can use
wildcars. E.g.: body~ "hello*my_first_name"

You can define action for each rule. This action will be performed if the
value of this rule is TRUE. The action must be placed after logical
expression.
Also, you can define action for each addressee. This action will be
performed if one of his rules returns TRUE. This definitions must be
concluded ';'

Generating auto-answers.
Syntax:
    [to: to@email] [from: from@email] [subj: "subject with blanks"]
    replay: "Text of message %MACRO-VAR1% %MACRO-VAR2% ..."
    or
    message: "Text of message %MACRO-VAR1% %MACRO-VAR2% ..."
    or
    replay-with-pattern: "path_of_pattern_file"
List of macro variables:
        FROM        - e-mail of sender
        TO-         - e-mail of recipient
        SUBJ        - subject of e-mail
        BODY        - body of e-mail (if e-mail is text/plain)
        RAW-BODY    - body of e-mail as is (MAX-BODY-SIZE)
        DATE        - current system date
        TIME        - current system time
        NEW-LINE    - new line
        PERCENT     - percent sign

Sample content of pattern file:
(First 5 lines and last '.' are required)
-------------- begin of pattern file ----------------------------------
For: %FROM%
From: %TO-%
To: %FROM%
Subject: Re:%SUBJ%

This must be placed your message
.
-------------- end of pattern file ------------------------------------